a5_savetowebappemailoutbox Function

Syntax

L a5_SaveToWebAppEmailOutBox(P pMessage, P pResult)

Arguments

pMessagePointer

The email message to save. It can define the following properties:

errorTextCharacter

If an error occurred while sending the email, contains additional information about the error.

dateStampTime

The date the message was sent.

subjectCharacter

The email subject

sent_byCharacter

The email address of the sender. E.g. "[email protected]"

sent_by_aliasCharacter

The name of the sender E.g. "Bob Jones".

messageCharacter

The email message.

senttoCharacter

The email address where the message was sent.

pResultPointer

Contains additional information about the result of calling the function. The pResult will have the following properties:

errorTextCharacter

If an error occurred while trying to save the email to the email outbox, this property will contain details about the error.

Returns

resultLogical

Returns .T. if the email was saved. Returns .F. if an error was encountered. If an error occurred, pResult.errorText will contain additional information.

Description

Used in a Web application to save an e-mail to the e-mail outbox

Discussion

The a5_SaveToWebAppEmailOutBox() function is a utility function used to store data in an email outbox table. While this function could be used to store data to the outbox table, other techniques exist to write to this table (such as using an AlphaDAO connection string and the sql_insert() function.) An option to save sent messages to the outbox table is included in the built-in email actions for Server-side Action Scripting and Action Javascript.

Example

dim pResult as p
dim pMessage as p
pmessage.wasSent = "Yes"
pmessage.message = "this is the message that was sent"
a5_SaveToWebAppEmailOutBox(pMessage,pResult)

Limitations

Internal Use Only

See Also